figure(1)
close
figure(1)
hold on
FigureTitle = 'Figure5-Zeta-WaterContent';


axesMajors = [0 1000 0 30; 0 1000 0 30 ;...
    0 1000 0 30 ];


numcolumns = 3;
numrows = 1;

UTarget = [0.5 1 3]; 

for kk = 1:size(UTarget,2)

        
     
        figure(1)
        %for 3x2
        %set(gcf, 'Units', 'Inches', 'Position', [8.9306 0 6.8333 9.7778], 'PaperUnits', 'Inches', 'PaperSize', [8.5, 11])
        % set(gcf, 'Units', 'Inches', 'Position',[6.5278 0.1667 8.8056 12.7222], 'PaperUnits', 'Inches', 'PaperSize', [8.5, 11])
        % subaxis(numrows,numcolumns,n,'Spacing',.08,'Margin',0.02,'MarginBottom',.06,'MarginLeft',.06,'Padding',0,'PaddingLeft',0.02)
        
        %for 3x3
        %set(gcf, 'Units', 'Inches', 'Position', [8.0556 3.8889 10.7083 9.7778], 'PaperUnits', 'Inches', 'PaperSize', [8.5, 11])
        set(gcf, 'Units', 'Inches', 'Position',  [3.7917 7 16.4861 5.6111], 'PaperUnits', 'Inches', 'PaperSize', [8.5, 11])
        subaxis(numrows,numcolumns,kk,'Spacing',.03,'Margin',0.015,'MarginLeft',.05,'Padding',0.00,'PaddingLeft',0.015,'PaddingBottom',.05)
        
     
        
        axis(axesMajors(kk,:))
        hold on
        axis square
        
       
        for iik=1:numberModels
            
            layerplot_color_here = eval(char(layerplot_color(iik)));
            layerplot_color_here_fill = eval(char(layerplot_color_fill(iik)));
            layerplot_color_here_edge = eval(char(layerplot_color_edge(iik)));
            mymarkersize = layerplot_markersize(iik);
  
            which2plot = find(ismember(eval(sprintf('%s_U', TabNames{iik})), UTarget(kk))); 

            plot(eval(sprintf('%s_Water(%s)', TabNames{iik},'which2plot')),...
            eval(sprintf('%s_WGP(%s)', TabNames{iik},'which2plot')), ...
            char(layerplot_marker(iik)), 'Color',layerplot_color_here, 'MarkerFaceColor',layerplot_color_here_fill,...
            'MarkerEdgeColor',layerplot_color_here_edge,...
            'MarkerSize',layerplot_markersize(iik),'LineWidth',layerplot_linewidth(iik))
        end
        
         text(200,25,sprintf('%g cm/yr',UTarget(kk)),'FontName','Times New Roman','FontSize',17)
        
         xlabel('Water in Source (ppm)')
         
         if kk==1
         ylabel('\zeta_P')
         end
         
             
         if kk==3
             legend(names4legend_all)
         end
        
        
        box on
        ax = gca;
        ax.XAxis.MinorTick = 'on';
        increment = findBestIncrement( ax.XLim(2)- ax.XLim(1),ax.XAxis.TickValues(2) -  ax.XAxis.TickValues(1));
        ax.XAxis.MinorTickValues = ax.XLim(1):increment:ax.XLim(2);
        ax.YAxis.MinorTick = 'on';
        increment = findBestIncrement( ax.YLim(2)- ax.YLim(1),ax.YAxis.TickValues(2) -  ax.YAxis.TickValues(1));
     
        ax.YAxis.MinorTickValues = ax.YLim(1):increment:ax.YLim(2);
        
       ax=gca;
       ytickformat(ax, 'percentage'); 
       
      ticklengthgood = 4*[0.01 0.025]; 
        
        set(gca,'ticklength',ticklengthgood)
        
        set(gca,'fontsize', 18,'LineWidth',0.7,'FontName','Times New Roman')
        set(gca,'XColor', 'k')
        set(gca,'YColor', 'k')
        FigureTitle = 'WaterZeta-Fig4';
        set(gcf,'name',regexprep(FigureTitle,'\_*',''))
  
     
end


    
%%
figure(2)
close
figure(2)
hold on
FigureTitle = 'Figure6-Zeta-SpreadingRate';
set(gcf,'name',regexprep(FigureTitle,'\_*','-'))



axesMajors = [0 10 0 30; 0 10 0 30 ;...
    0 10 0 30 ];

numcolumns = 3;
numrows = 1;

WaterTarget = [0 500 1000]; 


for kk = 1:size(WaterTarget,2)


        set(gcf, 'Units', 'Inches', 'Position',  [3.7917 7 16.4861 5.6111], 'PaperUnits', 'Inches', 'PaperSize', [8.5, 11])
        subaxis(numrows,numcolumns,kk,'Spacing',.03,'Margin',0.015,'MarginLeft',.05,'Padding',0.00,'PaddingLeft',0.015,'PaddingBottom',.05)
        
     
        
        axis(axesMajors(kk,:))
        hold on
        axis square
        
       
        for iik=1:numberModels
            
            layerplot_color_here = eval(char(layerplot_color(iik)));
            layerplot_color_here_fill = eval(char(layerplot_color_fill(iik)));
            layerplot_color_here_edge = eval(char(layerplot_color_edge(iik)));
            mymarkersize = layerplot_markersize(iik);
            
            which2plot = find(ismember(eval(sprintf('%s_Water', TabNames{iik})), WaterTarget(kk))); 

            plot(eval(sprintf('%s_U(%s)', TabNames{iik},'which2plot')),...
            eval(sprintf('%s_WGP(%s)', TabNames{iik},'which2plot')), ...
            char(layerplot_marker(iik)), 'Color',layerplot_color_here, 'MarkerFaceColor',layerplot_color_here,...
             'MarkerEdgeColor',layerplot_color_here_edge,...
            'MarkerSize',layerplot_markersize(iik),'LineWidth',layerplot_linewidth(iik))
        end
        
        text(2,25,sprintf('+%g ppm',WaterTarget(kk)),'FontName','Times New Roman','FontSize',17)
        
       
        
         set(gca, 'Xtick',unique(U))
         xlabel('Half-Spreading Rate (cm/yr)')
         
         if kk==1
         ylabel('\zeta_P')
          legend(names4legend_all)
         end
        
        
        box on
        ax = gca;
        ax.XAxis.MinorTick = 'on';
        increment=0.5; 
        ax.XAxis.MinorTickValues = ax.XLim(1):increment:ax.XLim(2);
        ax.YAxis.MinorTick = 'on';
        increment = findBestIncrement( ax.YLim(2)- ax.YLim(1),ax.YAxis.TickValues(2) -  ax.YAxis.TickValues(1));
     
        ax.YAxis.MinorTickValues = ax.YLim(1):increment:ax.YLim(2);
        
       ax=gca;
       ytickformat(ax, 'percentage'); 
       
       ticklengthgood = 4*[0.01 0.025]; 
        
        set(gca,'ticklength',ticklengthgood)
        
        set(gca,'fontsize', 18,'LineWidth',0.7,'FontName','Times New Roman')
        set(gca,'XColor', 'k')
        set(gca,'YColor', 'k')
        FigureTitle = 'UZeta-Fig5';
        set(gcf,'name',regexprep(FigureTitle,'\_*',''))
  
     
    end